fix(ci): make the devcontainer actually work - #7875
Conversation
The devcontainer.json that landed alongside an unrelated web styling change (0b1ce58) does not produce a working environment: bun install skips the pnpm catalogs and the patched dependencies, the node feature is a major behind, nothing installs vp, there is no Rust toolchain for native/resource-monitor, no ports are forwarded, and everything runs as root. Rebuild it to mirror CI (ubuntu-24.04, Node 24, Rust stable) and the documented setup: the global vp CLI installs on create, and vp i plus the Electron exec-bit repair and the Vite dep-cache warmup run on content updates so Codespaces prebuilds stay warm. Named volumes for the pnpm store and root node_modules make rebuild installs take seconds and keep the heavy tree off slow macOS bind mounts. Dev ports are forwarded with pairing guidance, state stays in the workspace's gitignored .t3, and docs/internals/devcontainer.md documents what works and what stays host-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
What Changed
.devcontainer/now produces a working, CI-matching dev environment: Ubuntu 24.04 with the Node 24, Rust, and GitHub CLI features, the globalvpCLI installed on create, andvp iplus the Electron exec-bit repair and Vite dep-cache warmup on content updates (so Codespaces prebuilds bake them in). Named volumes for the pnpm store and rootnode_modulesmake rebuild installs take seconds and keep the heavy tree off slow macOS bind mounts. Dev ports are forwarded with pairing guidance, runtime state stays in the workspace's gitignored.t3, anddocs/internals/devcontainer.mddocuments what works in the container and what stays host-only (windowed Electron, mobile native builds, tailnet sharing).This PR only touches
.devcontainer/and the two docs pages. No app code, contracts, providers, or CI workflows change.Why
The current
devcontainer.jsonlanded alongside an unrelated web styling change (0b1ce58) and does not produce a working environment:bun installbypassesvp i, so the pnpm catalogs and the 16 patched dependencies are never applied; the node feature is a major version behind; nothing installsvp, so no repo script can run; there is no Rust toolchain fornative/resource-monitor; no ports are forwarded; and everything runs as root. Rebuilding it around the documented setup (docs/internals/scripts.md: globalvp, thenvp i) is the smallest correct fix; each choice in the config carries a comment explaining it. No open issue tracks this, so this PR carries the motivation.Verification
All checks ran against a clean clone of this branch using the Dev Container CLI (
@devcontainers/cliviadevcontainer up/exec), on Docker 29.7.2, Apple Silicon (linux/arm64):vp iin 1m 27.9s, lifecycle completed through the dep-cache warmup.vpon PATH, Node v24.19.0, pnpm 11.10.0, rustfmt present, gh present, first-run notice rendered.vp run --filter @t3tools/contracts typecheckpassed;cargo fmt --manifest-path native/resource-monitor/Cargo.toml -- --checkpassed.vp iin 10.5s.vp ireinstalled from the warm store volume in 58.1s (store volume held 919MB).Checklist
Implementation and verification used Claude Fable 5 in Claude Code.
Note
Low Risk
Contributor-only Docker/docs changes; no application, auth, or CI workflow code. Residual risk is the create script fetching the
vpinstaller from the network.Overview
Rebuilds
.devcontainer/so it actually matches contributor setup and Linux CI, instead of a Debian/Bun image that skippedvp i.Switches to Ubuntu 24.04 with Node 24, Rust, and GitHub CLI; installs global
vpon create; runsvp i, Electron exec-bit repair, and Vite dep-cache warmup on content updates (so Codespaces prebuilds bake them in). Named volumes cache the pnpm store and rootnode_modules. Forwards the web/server ports, pins runtime state to workspace.t3, and runs asvscode.Adds
docs/internals/devcontainer.md(what works vs host-only) and a pointer fromscripts.md. No app or CI workflow changes.Reviewed by Cursor Bugbot for commit 3927926. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix devcontainer to use Ubuntu 24.04 with Node 24, Rust, and lifecycle scripts
vp), and update-content.sh to fix mounted-dir ownership, runvp i, repair Electron, and warm the Vite dep cachenode_modules, forwards ports 5733 and 13773, and configures VS Code extensions/settingsT3CODE_HOMEis set to the workspace.t3directory; existing users relying on the previous Debian image or bun-based setup must update their workflowsMacroscope summarized 3927926.